<template>
	<view class="box">
		<view class="header">
			<view class="header_left" @click="go">
				<image src="https://s1.ax1x.com/2022/12/06/z6c0v8.jpg" mode=""></image>
				返回
			</view>
			<view class="header_center">
				报修记录
			</view>
		</view>
		<view class="list">
			<view class="top">
				<view class="top_left">
					{{data.address}}
				</view>
				<view class="top_center">
					{{data.typename}}
				</view>
				<view class="top_right">
					{{data.statename}}
				</view>
			</view>
			<view class="text">
				<view class="">
					{{data.content}}
				</view>
			</view>
			<view class="imgs" v-for="item in data.images" :key="item.id">
				<image :src="IMGURL+item.url" mode=""></image>
			</view>
			<view class="time">
				{{data.addtime}}
			</view>
		</view>
		<view class="btm">
			
		</view>
	</view>
</template>

<script>
	import {repairdetail} from '../../../utils/api.js'
	import {IMG} from'../../../utils/cofing.js'
	export default{
		data(){
			return{
				IMGURL:IMG,
				id:'',
				data:{}
			}
		},
		onLoad(e){
			this.id = e.id
			this.getrepairdetail()
		},
		methods:{
			async getrepairdetail(){
				let res = await repairdetail({id:this.id})
				console.log(res);
				if(res.errCode==10000){
					this.data = res.data
				}
			},
			go(){
				uni.navigateBack({
					delta:1
				})
			}
		}
	}
</script>

<style lang="less">
	.box{
		width: 100%;
		height: 100vh;
		background-color: #f0f0f0;
		.header{
			width: 730rpx;
			height: 128rpx;
			background-color: #fff;
			font-size: 30rpx;
			line-height: 128rpx;
			display: flex;
			padding: 0 10rpx;
			.header_left{
				margin-right: 230rpx;
				image{
					width: 25rpx;
					height: 25rpx;
					margin-right: 5rpx;
				}
			}
		}
		.list{
			width: 730rpx;
			margin-top: 17rpx;
			margin-left: 10rpx;
			background-color: #fff;
			border-radius: 10rpx;
			.top{
				width: 660rpx;
				height: 79rpx;
				border-bottom: 1rpx solid #f0f0f0;
				margin-left: 37rpx;
				display: flex;
				align-items: center;
				font-size: 22rpx;
				color: #666666;
				.top_left{
					margin-right: 22rpx;
				}
				.top_center{
					margin-right: 180rpx;
				}
			}
			.text{
				width: 600rpx;
				height: 124rpx;
				margin-left: 37rpx;
				font-size: 24rpx;
				display: flex;
				line-height: 45rpx;
				view{
					margin-top: 20rpx;
				}
			}
			.imgs{
				width: 660rpx;
				margin-left: 37rpx;
				image{
					width: 605rpx;
					height: 402rpx;
					margin-bottom: 30rpx;
				}
			}
			.time{
				width: 660rpx;
				height: 75rpx;
				border-top: 1rpx solid #f1f1f1;
				margin-left: 37rpx;
				line-height: 75rpx;
				font-size: 20rpx;
				color: #666666;
			}
		}
		.btm{
			width: 100%;
			height: 200rpx;
			background-color: #f0f0f0;
		}
	}
</style>